package model.commands;

import java.util.ArrayList;
import java.util.List;
import model.Environment;
import model.SyntaxErrorException;


/**
 * A command.
 * 
 * @author Erick Gonzalez
 * @author JLongley
 */
public abstract class Command {
    private List<Command> myArguments;    

    /**
     * Default Constructor.
     */
    public Command() {
        myArguments = new ArrayList<Command>();
    }    

    /**
     * 
     * 
     * @return a list of command objects serving as arguments to this command
     */
    public List<Command> getArguments() {
        return myArguments;
    }

    /**
     * 
     * @param e an environment objecta
     * @return the return value of this command
     * @throws SyntaxErrorException 
     */
    public abstract int evaluate(Environment e) throws SyntaxErrorException;
}
